
<script setup>
import { ref } from "vue";
const count = ref(1000)

//复杂类型
const person = ref({
  name: "张三",
  age: 18,
  sex: "男",
});
const addCount = () => {
  count.value++;
};

const Channel = () => {
  person.value.name = "李四";
  person.value.age = 20;
  person.value.sex = "女";
};
</script>
<template>
  <div>
    <button @click="addCount">{{ count }}</button>
    <br>
    <hr>
    {{ person }}

    <button @click="Channel">修改</button>
  </div>
</template>
<style scoped>

</style>

